<template>
  <div>
      <!--  头部-->
    <mt-header class="header" fixed title="新闻详情">
      <router-link to="/home/newlists" slot="left">
        <mt-button icon="back" @click="$router.go(-1)"></mt-button>
      </router-link>
    </mt-header>
    <div class="daodu">
        <p>{{daoyu}}</p>
    </div>
    <div class="newsinfoimg">
       <h1><img src="./quesheng.png" width="100%"></h1>
    </div>
    <comment></comment>
  </div>
</template>
<style lang="scss" scoped>
.header {
  background: #fff;
  box-shadow: 0 0 10px rgba($color: #000000, $alpha: 0.05);
  color: #333;
  }
  .newsinfoimg{
      width: 100%;
      height: 370px;
      overflow: hidden;
      h1{
          position: relative;
          top: -100px;
      }
  }
  .daodu{
    background: #fff;
    width: 100%;
    padding-top: 50px;
    display: flex;
    justify-content: center;
    p{
      width: 90%;
      margin: 0 auto;
      font-size: 1rem;
      color: #666;
      background: #f5f5f5;
      padding: 5px;
      text-align: left;
     border-radius: 3px;
    }
  }

</style>
<script>

import comment from '../subcomponents/comment.vue'

export default {
    data() {
        return {
           daoyu:this.$route.params.dist
        }
    },
    created(){
        
    },
    components:{
     comment:comment
    },
    mounted(){
        this.$router.afterEach((to, from, next) => {
        window.scrollTo(0, 0)
    })
    }
};

</script>
